package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.QueryObject;
import cn.wolfcode.util.JsonResult;
import com.github.pagehelper.PageInfo;
import lombok.extern.java.Log;
import org.apache.poi.ss.usermodel.Workbook;

import javax.management.Query;
import java.util.List;

public interface IEmployeeService {

    //做分页、过滤查询
    PageInfo<Employee> query(QueryObject qo);



    void insert(Employee employee);

    void delete(Long id);

    //查询所有的角色
    List<Role> getRoles();

    //新增关系:将employee对应的ids新增进入employee_role表中
   void save(Employee employee,Long[] ids);

    //查询回显到编辑按钮中
    Employee selectOne(Long id);

    void update(Employee employee,Long[] ids);

    //登陆判断
    Employee login(String username,String password);

    //导出
    Workbook exportXls();

    Employee selectByUsername(String username);

    //查询所有员工
    List<Employee> list();

    void updateUserStatus(Long id,Boolean status);

    public void setStatus(Boolean status,Long id);

    void status(boolean status, Long id);

    void batchDelete(Long[] ids);

    void updateById(Long id,String newPassword);
}
